package FreshmenTest00;
import java.util.*;
/**
 * Enjoy programming!!!
 * Time: 2021/11/2 -  13:16
 */
public class Propaganda {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int layer = in.nextInt();
        int sum = 0;
        int t = 0;
        for ( int i = 0; i < layer; i++){
            sum = in.nextInt();
            t += sum;
        }
        in.close();
        if (0 == t%2)
            System.out.println(t);
        else
            System.out.println(t - 1);
    }
}
